﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;

namespace linkouqs.Gamekit
{
    [CanEditMultipleObjects]
    [CustomEditor(typeof(CharacterController2D))]
    public class CharacterController2DEditor : Editor
    {

        public override void OnInspectorGUI()
        {
            base.OnInspectorGUI();


            CharacterController2D controller2D = target as CharacterController2D;

            float max = controller2D.jumpHeight;
            float min = controller2D.jumpHeight * controller2D.minHeigthPercent;

            EditorGUILayout.HelpBox(string.Format("跳跃高度计算：\n\t最小高度约等于{0:f4}\n\t最大高度约等于{1:f4}", min, max), MessageType.Info);

        }

    }

}
